{? if $errors|@is_array || $errors|strlen > 0 ?}
	{? assign var=has_error value=true ?}
{? else ?}
	{? assign var=has_error value=false ?}
{? /if ?}

<fieldset id="sign" class="signup update_user_information">

	<legend>Change your password</legend>

		<form action="/soj/php/account/do_change_user_password.php" method="post" name="change_user_password">
		
		<div >
			<div class="error" {? if !$has_error ?}style="display:none;"{? /if ?}>
			
				{? if $errors|@is_array ?}
					{? foreach key=key item=item from=$errors ?}
						{? if $key eq "message"?}
							{? if $item|@is_array ?}
								<ul>

								{? foreach key=key item=sub_mes from=$item ?}
									<li>
								
									{? $sub_mes ?}
								
									</li>
								{? /foreach ?}

								</ul>

							{? else ?}
								{? $item ?}
							{? /if ?}
						{? else ?}
							{? assign var=$key value=$item ?}
						{? /if ?}
					{? /foreach ?}
				{? else ?}
  					{? $errors|escape ?}
				{? /if ?}
			
			</div>

			<div id="username_container" class="row">
				<label for="username" >Username</label>
				<span class="username">{? $username ?}</span>
			</div>

			<div id="old_password" class="row {? if $old_password eq true ?}error_field{? /if ?}">
				<label for="old_password" >Old Password</label>
				<input type="password" name="old_password" />
			</div>

			<div id="new_password" class="row {? if $new_password eq true ?}error_field{? /if ?}">
				<label for="new_password" >New Password</label>
				<input type="password" name="new_password" />
			</div>

			<div id="new_password_again" class="row {? if $new_password_again eq true ?}error_field{? /if ?}">
				<label for="new_password_again" >New Password Again</label>
				<input type="password" name="new_password_again" />
			</div>
			
			<div class="submit">
				<input type="submit" value="Update" />
				<input type="reset" value="Reset" />
			</div>
		
		</div>
			
		</form>
</fieldset>

